package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by VegetaKo on 2016/9/25.
 */
@Entity
@DynamicInsert
@Table(name = "l2r_ipms2_reservation", catalog = "")
public class L2RIpms2Reservation  extends BaseEntity{
    private String hotelId;
    private String hotelGroupId;
    private String hotelName;
    private String l2RNo;
    private String crsNo;
    private String pmsSta;
    private String memberNo;
    private String openId;
    private String rsvMan;

    @Basic
    @Column(name = "hotel_id", nullable = false, length = 20)
    public String getHotelId() {
        return hotelId;
    }

    public void setHotelId(String hotelId) {
        this.hotelId = hotelId;
    }

    @Basic
    @Column(name = "hotel_group_id", nullable = false, length = 20)
    public String getHotelGroupId() {
        return hotelGroupId;
    }

    public void setHotelGroupId(String hotelGroupId) {
        this.hotelGroupId = hotelGroupId;
    }

    @Basic
    @Column(name = "hotel_name", nullable = true, length = 60)
    public String getHotelName() {
        return hotelName;
    }

    public void setHotelName(String hotelName) {
        this.hotelName = hotelName;
    }

    @Basic
    @Column(name = "l2r_no", nullable = true, length = 32)
    public String getL2RNo() {
        return l2RNo;
    }

    public void setL2RNo(String l2RNo) {
        this.l2RNo = l2RNo;
    }

    @Basic
    @Column(name = "crs_no", nullable = true, length = 32)
    public String getCrsNo() {
        return crsNo;
    }

    public void setCrsNo(String crsNo) {
        this.crsNo = crsNo;
    }

    @Basic
    @Column(name = "pms_sta", nullable = true, length = 16)
    public String getPmsSta() {
        return pmsSta;
    }

    public void setPmsSta(String pmsSta) {
        this.pmsSta = pmsSta;
    }

    @Basic
    @Column(name = "member_no", nullable = true, length = 16)
    public String getMemberNo() {
        return memberNo;
    }

    public void setMemberNo(String memberNo) {
        this.memberNo = memberNo;
    }
    @Basic
    @Column(name = "rsv_man", nullable = true, length = 60)
    public String getRsvMan() {
        return rsvMan;
    }

    public void setRsvMan(String rsvMan) {
        this.rsvMan = rsvMan;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RIpms2Reservation that = (L2RIpms2Reservation) o;

        if (hotelId != null ? !hotelId.equals(that.hotelId) : that.hotelId != null) return false;
        if (hotelGroupId != null ? !hotelGroupId.equals(that.hotelGroupId) : that.hotelGroupId != null) return false;
        if (hotelName != null ? !hotelName.equals(that.hotelName) : that.hotelName != null) return false;
        if (l2RNo != null ? !l2RNo.equals(that.l2RNo) : that.l2RNo != null) return false;
        if (crsNo != null ? !crsNo.equals(that.crsNo) : that.crsNo != null) return false;
        if (pmsSta != null ? !pmsSta.equals(that.pmsSta) : that.pmsSta != null) return false;
        if (memberNo != null ? !memberNo.equals(that.memberNo) : that.memberNo != null) return false;
        if (rsvMan != null ? !rsvMan.equals(that.rsvMan) : that.rsvMan != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = hotelId != null ? hotelId.hashCode() : 0;
        result = 31 * result + (hotelGroupId != null ? hotelGroupId.hashCode() : 0);
        result = 31 * result + (hotelName != null ? hotelName.hashCode() : 0);
        result = 31 * result + (l2RNo != null ? l2RNo.hashCode() : 0);
        result = 31 * result + (crsNo != null ? crsNo.hashCode() : 0);
        result = 31 * result + (pmsSta != null ? pmsSta.hashCode() : 0);
        result = 31 * result + (memberNo != null ? memberNo.hashCode() : 0);
        result = 31 * result + (rsvMan != null ? rsvMan.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "open_id", nullable = true, length = 32)
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public enum L2RIpms2Reservation_{
        hotelId,hotelGroupId,hotelName,l2RNo,crsNo,pmsSta,memberNo
    }
}
